<?php
/**
 * Created by JetBrains PhpStorm.
 * User: ersv
 * Date: 12/11/12
 * Time: 9:53 AM
 * To change this template use File | Settings | File Templates.
 */
class Session_EMyLink
{
    /*
     * Khởi tạo session
     */
    public function __construct()
    {
        session_start();
    }
    /*
     * lấy session nếu có nếu không trả về rỗng
     */
    public static function getSession($name,$value="")
    {
        if(isset($_SESSION[$name]))
        {
            return $_SESSION[$name];
        }
        else
        {
            return $value;
        }
    }
    public static function setSession($name,$value)
    {
        $_SESSION[$name]=$value;
    }
    public static function unsetSession($name)
    {
        unset($_SESSION[$name]);
    }
}
